<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

<h:head>
	<title><h:outputText value="#{usuarioBean.usuarioLogado.nome}" />
		| Linkers</title>
	<link rel="stylesheet" type="text/css" href="css/estrutura.css" />
	<script type="text/javascript" src="js/control.js"></script>

	<link rel="icon" href="imgs/favicon.ico" type="image/x-icon" />
	<link rel="shortcut icon" href="imgs/favicon.ico" type="image/x-icon" />
	<link rel="shortcut icon" href="imgs/favicon.ico"
		type="image/vnd.microsoft.icon" />
</h:head>
<body>

	#{usuarioBean.permissaoLogado()}

	<div class='center'>

		<div class='inner'>
			<div class='top'>



				<div class='perfil'>
					<img id='perfil' src="user/perfil.jpg" />
				</div>

				<div class='dados'>
					<div class='nome'>
						<h:outputText value="#{usuarioBean.usuarioLogado.nome}" />

						<a href="#opcoes" onclick="PF('dlgopcoes').show();"><img
							src="imgs/seta-info.png" /></a>
					</div>
					<div class='numero'>
						<h:outputText value="#{telefoneBean.telefoneLogadoFormatado}" />

					</div>
					<div>
						<h:form>
							<h:commandLink action="#{usuarioBean.logout()}" value="Logout" />
						</h:form>
					</div>
				</div>

				<div class='logo-linkers'>
					<img src="imgs/linkers-logo.png" />
				</div>
			</div>
		</div>

		<div class='contorno'>

			<div class='meio'>

				<div class='inner'>


					<div class='half'>
					
					<a href="#" class="bt" style="float: right; margin-right: 10px; border-bottom-right-radius: 50px;">Linkar</a>

						<div class='view'>
							<div class='img'>
								<img src="user/user-pad.jpg" width="160" />
							</div>
							<div class='epc nome'>
								<span class='tt'> <h:outputText
										value="#{usuarioBean.usuarioView.nome}" />
								</span>
							</div>
							<div class='epc endereco'>
								<h:outputText value="#{usuarioBean.usuarioView.endereco}" />
								<br /> Fortaleza - CE
							</div>

							<div class='clearb'></div>


							<div class="floatr-tel">
								<h:dataTable value="#{telefoneBean.telefonesView}" var="tel">
									<h:column>
										<div class='epc tel'>
											<span class='tt'> <h:outputText
													value="#{tel.tipo.descricao}" />
											</span> <span class='val'>(<h:outputText value="#{tel.ddd}" />)
												<h:outputText value="#{tel.numero}" /></span>
											<div class="clearb"></div>
										</div>
									</h:column>
								</h:dataTable>
							</div>


							<div class="floatr-email">
								<h:dataTable value="#{emailBean.emailsView}" var="email">
									<h:column>
										<div class='epc email'>
											<span class='tt'> <h:outputText
													value="#{email.tipo.descricao}" />
											</span> <span class='val'> <h:outputText
													value="#{email.email}" />
											</span>
											<div class="clearb"></div>
										</div>
									</h:column>
								</h:dataTable>
							</div>



							<a class='bt' href="user.xhtml">&laquo; Voltar</a>

						</div>


					</div>




					<div class='half'>
						<h:form>
							<h:inputText value="#{usuarioBean.nomeBuscadoAmigo}"
								styleClass="tf tf-pesquisa" />
						</h:form>
						<div class='contatos'>

							<h:form>
								<p:dataList value="#{usuarioBean.listarTodosAmigosDoAmigo()}"
									var="contat">


									<p:commandLink
										actionListener="#{usuarioBean.carregaUsuario(contat)}"
										ajax="false">
										<div class='contato tbnc v#{utils.numAlternado}'>
											<div class='img'>
												<img src="user/user-pad.jpg" />
											</div>
											<div class='nome'>
												<h:outputText value="#{contat.nome}" />
											</div>
											<div class='clearb'></div>
										</div>
									</p:commandLink>


								</p:dataList>
							</h:form>

						</div>
					</div>



				</div>


			</div>

		</div>


		<div class='inner'>
			<div class='rdp' style='display: block'>
				<div class='menu'>
					<a href="home.xhtml">início</a> 
					<a href="user.xhtml">Busca</a> 
					<a href="sobre.xhtml">Sobre Nós</a> <a href="#">Política</a> 
					<a href="desenvolvedores.xhtml">Desenvolvedores</a>
				</div>
				Copyright&copy; Linkers - 2013 - Inovati Soluções
			</div>
		</div>

	</div>

	<p:dialog header="Configurações" widgetVar="dlgopcoes"
		showEffect="explode" modal="true" hideEffect="bounce" height="100">
		<h:form>
			<p:commandButton value="Editar Informações"
				actionListener="#{utils.redirect('editar')}" ajax="false" />
			<br />
			<p:commandButton value="Cancelar conta"
				actionListener="#{utils.redirect('cancelando')}" ajax="false" />
		</h:form>
	</p:dialog>

	<script>
$(document).ready(function(){
	$('.tf-pesquisa').focus();
});
</script>

</body>
</html>
